/* __auth__ : KunLin */
package com.cskaoyan.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.*;

import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Setting(settingPath = "elasticsearch_setting.json")
@Document(indexName = "goods")
public class Goods {
    @Id
    private Integer id;

    @Field(type = FieldType.Keyword)
    private String goodsSn;

    @Field(type = FieldType.Text, analyzer = "ik_smart_pinyin")
    private String name;

    @Field(type = FieldType.Keyword)
    private Integer categoryId;

    @Field(type = FieldType.Keyword)
    private Integer brandId;

    @Field(type = FieldType.Keyword)
    private String[] gallery;

    @Field(type = FieldType.Text, analyzer = "ik_smart_pinyin")
    private String keywords;

    @Field(type = FieldType.Text, analyzer = "ik_smart_pinyin")
    private String brief;

    @Field(type = FieldType.Keyword)
    private Boolean isOnSale;

    @Field(type = FieldType.Keyword)
    private Short sortOrder;

    @Field(type = FieldType.Keyword)
    private String picUrl;

    @Field(type = FieldType.Keyword)
    private String shareUrl;

    @Field(type = FieldType.Keyword)
    private Boolean isNew;

    @Field(type = FieldType.Keyword)
    private Boolean isHot;

    @Field(type = FieldType.Keyword)
    private String unit;

    @Field(type = FieldType.Keyword)
    private BigDecimal counterPrice;

    @Field(type = FieldType.Keyword)
    private BigDecimal retailPrice;

    @Field(type = FieldType.Keyword)
    private Date addTime;

    @Field(type = FieldType.Keyword)
    private Date updateTime;

    @Field(type = FieldType.Keyword)
    private Boolean deleted;

    @Field(type = FieldType.Keyword)
    private String detail;
}